<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>8综合案例五彩导航</title>
</head>
<style>
  .nav a {
    display: inline-block;
    width: 300px;
    height: 180px;
    /* background: pink; */
    line-height: 200px;
    color: #fff;
    text-decoration: none;
    text-indent: 5em;
  }

  .nav .bg1 {
    background-image: url(images/bg1.png);
    background-position: left center;
    background-repeat: no-repeat;
  }

  .nav .bg1:hover {
    background-image: url(images/bg2.png);
  }

  .nav .bg2 {
    background-image: url(images/bg2.png);
    background-position: 30px center;
    background-repeat: no-repeat;
  }

  .nav .bg2:hover {
    background-image: url(images/bg3.png);
  }

  .nav .bg3 {
    background-image: url(images/bg3.png);
    background-position: 30px center;
    background-repeat: no-repeat;
  }

  .nav .bg3:hover {
    background-image: url(images/bg4.png);
  }

  .nav .bg4 {
    background-image: url(images/bg4.png);
    background-position: 30px center;
    background-repeat: no-repeat;
  }

  .nav .bg4:hover {
    background-image: url(images/bg5.png);
  }

  .nav .bg5 {
    background-image: url(images/bg5.png);
    background-position: 30px center;
    background-repeat: no-repeat;
  }

  .nav .bg5:hover {
    background-image: url(images/bg1.png);
  }
</style>

<body>
  <div class="nav">
    <a href="#" class="bg1">五彩导航</a>
    <a href="#" class="bg2">五彩导航</a>
    <a href="#" class="bg3">五彩导航</a>
    <a href="#" class="bg4">五彩导航</a>
    <a href="#" class="bg5">五彩导航</a>
  </div>

</body>

</html>